import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    component: () => import("@/components/CommonLayout.vue"),
    children: [
      {
        path: "",
        name: "home",
        component: () => import("@/views/Home.vue")
      },
      {
        path: "/doc",
        name: "doc",
        component: () => import("@/views/DocCenter.vue")
      },
      {
        path: "/manage",
        name: "manage",
        component: () => import("@/views/ManageCenter.vue")
      },
      {
        path: "/help",
        name: "help",
        component: () => import("@/views/HelpCenter.vue")
      },
      {
        path: "/register",
        name: "register",
        component: () => import("@/views/Register.vue")
      }
    ]
  }
];

const router = new VueRouter({
  routes
});

export default router;
